{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "93cf9074",
   "metadata": {},
   "source": [
    "|  字典的方法   |              description                       |       具体使用         |\n",
    "|   :---      |               :----:                         |         ---:          |\n",
    "|  dict.clear()  |      清空字典中所有的 key-value，该字典变成一个空字典      |        D.clear()        |\n",
    "|  dict.copy()   |    返回一个字典的拷贝，也即返回一个具有相同键值对的新字典    |       b=D.copy()        |\n",
    "|  dict.fromkeys |              给定多个K创建新V                    |       D.fromkeys(k, v)   |\n",
    "|  dict.get()   |            根据 key 来获取 value                  |        D.get(k)         |\n",
    "|  dict.items()  |        以列表返回可遍历的（键，值）元组数组            |        D.items()        |\n",
    "|  dict.keys()   |          以列表返回一个字典所有的键                |        D.keys()         |\n",
    "|  dict.pop()   |  删除字典给定键key所对应的值 key值必须给出,否则，返回default值 |        D.pop(k)         |\n",
    "|  dict.popitem  |          随机返回并删除字典中的一对键和值            |        D.popitem()        |\n",
    "| dict.setdefault| 返回指定键的值，如果没有找到key，则在dict中加上该key，值由default参数给出，默认None |   D.setdefault(k) |\n",
    "| dict.update()  |             插入指定的项目                      |       D.update({k,v})    |\n",
    "| dict.values   |            返回字典中所有键对应的值                |        D.values()       |"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c03cc0c2",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
